/* VetCRM-inspired component styles */

/* Sidebar navigation */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.sidebar-link:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}
.sidebar-link-active {
    background-color: #ccfbf1;
    color: #0f766e;
}
.sidebar-link-active:hover {
    background-color: #ccfbf1;
    color: #0f766e;
}
.sidebar-link svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

/* Sidebar width & collapse */
.sidebar-expanded { width: 16rem; }
.sidebar-collapsed { width: 4.5rem; }
.sidebar {
    height: 100vh;
    height: 100dvh;
}
.sidebar-collapsed .sidebar-label { display: none; }
.sidebar-collapsed .sidebar-link,
.sidebar-collapsed .sidebar-sublink,
.sidebar-collapsed .sidebar-link-logout,
.sidebar-collapsed .sidebar-section-title {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.sidebar-collapsed .sidebar-brand {
    flex: none;
    justify-content: center;
}
.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.sidebar-collapsed .sidebar-submenu {
    padding-left: 0;
    margin-left: 0;
    border-left: none;
}
.sidebar-section-divider {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}
.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}
.sidebar-section-title svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
.sidebar-submenu {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.sidebar-submenu-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 0.375rem 0.75rem;
}
.sidebar-logout-form {
    margin: 0;
}
.sidebar-link-logout {
    color: #dc2626;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.sidebar-link-logout:hover {
    background-color: #fef2f2;
    color: #b91c1c;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.sidebar-sublink:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}
.sidebar-sublink-active {
    background-color: #f0fdfa;
    color: #0f766e;
}
.sidebar-sublink-active:hover {
    background-color: #f0fdfa;
    color: #0f766e;
}
.sidebar-sublink svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Sidebar alt: kullanıcı bilgisi + menü küçültme */
.sidebar-footer {
    flex-shrink: 0;
    background-color: #fff;
}
.sidebar-footer-inner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}
.sidebar-user-avatar {
    flex-shrink: 0;
}
.sidebar-toggle {
    align-items: center;
    justify-content: center;
}
.sidebar-collapsed .sidebar-footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-collapsed .sidebar-user-info {
    justify-content: center;
    flex: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}
.sidebar-collapsed .sidebar-user-avatar {
    width: 2.25rem;
    height: 2.25rem;
}
.sidebar-collapsed .sidebar-toggle {
    width: 100%;
    justify-content: center;
}
.sidebar-collapsed .sidebar-section-title span {
    display: none;
}
.sidebar-collapsed .sidebar-section-title {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.btn-icon:hover {
    background-color: #f1f5f9;
    color: #0f766e;
}
.btn-icon-danger:hover {
    color: #dc2626;
    background-color: #fef2f2;
}

.sidebar-settings-toggle {
    display: none;
}

.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background-color: #16a34a;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
}
.btn-success:hover {
    background-color: #15803d;
}

.dues-matrix td, .dues-matrix th { white-space: nowrap; }

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background-color: #0f766e;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-primary:hover {
    background-color: #0d9488;
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background-color: white;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    text-decoration: none;
}
.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: #fef2f2;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid #fecaca;
    cursor: pointer;
    transition: background-color 0.15s;
}
.btn-danger:hover {
    background-color: #fee2e2;
}

/* Cards */
.card {
    width: 100%;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
}
.stat-card {
    width: 100%;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    transition: box-shadow 0.15s;
}
.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.stat-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Forms */
.input-field {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input-field:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}
.label-field {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.375rem;
}

/* Badges */
.badge-paid {
    display: inline-flex;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    background-color: #dcfce7;
    color: #15803d;
}
.badge-unpaid {
    display: inline-flex;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    background-color: #ffedd5;
    color: #c2410c;
}
.badge-admin {
    display: inline-flex;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    background-color: #ccfbf1;
    color: #0f766e;
}

/* Alerts */
.alert {
    margin-bottom: 1.5rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid;
}
.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.alert-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Page header (VetCRM style) */
.page-header {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 1.5rem;
    padding-top: 0.25rem;
    padding-bottom: 1rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: #0f172a;
}
.page-subtitle {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #64748b;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}
.section-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f766e;
    text-decoration: none;
}
.section-link:hover {
    text-decoration: underline;
}

[x-cloak] { display: none !important; }

/* Dropdown */
.dropdown-menu {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
}
.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #334155;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s;
}
.dropdown-item:hover {
    background-color: #f8fafc;
}
.dropdown-item-danger {
    color: #dc2626;
}
.dropdown-item-danger:hover {
    background-color: #fef2f2;
}
.dropdown-divider {
    height: 0;
    margin: 0.25rem 0;
    border-top: 1px solid #e2e8f0;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(15, 23, 42, 0.5);
}
.modal-dialog {
    width: 100%;
    max-width: 42rem;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
}
.modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    background-color: #f8fafc;
    border-radius: 0 0 0.75rem 0.75rem;
}
.modal-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    background: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}
.modal-close:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

/* Data table */
.data-table {
    width: 100%;
    font-size: 0.875rem;
}
.data-table thead {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr:hover {
    background-color: #f8fafc;
}
