/* 
 * OOU Cooperative System - Professional Solid Color Theme
 * Clean, modern, no gradients
 */

:root {
    --primary-color: #082b66;      /* COOPMS navy */
    --primary-dark: #061e4a;
    --primary-light: #0d3f86;
    --accent-color: #f4b51c;       /* COOPMS gold */
    --accent-dark: #d99a08;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    
    /* Neutral colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Spacing */
    --sidebar-width: 280px;
    --header-height: 70px;
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-800);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: #082b66;   /* COOPMS navy */
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.sidebar-header h3 {
    color: white;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.sidebar-header p {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
}

.sidebar-menu {
    padding: 1.5rem 0;
}
.sidebar-menu a,
.sidebar-menu .sidebar-form-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    background: transparent;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    text-align: left;
}
.sidebar-menu a i,
.sidebar-menu .sidebar-form-link i {
    width: 24px;
    font-size: 1.25rem;
    margin-right: 12px;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
}
.sidebar-menu a:hover,
.sidebar-menu .sidebar-form-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
    transform: translateX(5px);
}
.sidebar-menu a.active {
    background-color: rgba(244,181,28,0.14);
    color: white;
    border-left-color: var(--accent-color);
}
.sidebar-menu a.active i {
    color: var(--accent-color);
}
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: var(--transition);
}

/* Header */
.header {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-title h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--gray-800);
}
.header-title p {
    margin: 0.25rem 0 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: none;
    transition: var(--transition);
    overflow: hidden;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.card-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
}
.card-body {
    padding: 1.5rem;
}
.card-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* Stat Cards */
.stat-card {
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(45deg);
}
.stat-card i {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 3rem;
    opacity: 0.3;
    color: white;
}
.stat-card h3 {
    font-size: 2rem;
    margin: 0.5rem 0 0.25rem;
    color: white;
}
.stat-card p {
    margin: 0;
    opacity: 0.9;
    color: white;
}
.stat-card small {
    color: rgba(255, 255, 255, 0.8);
}
/* You can also create colored variants by using bg-success, etc. */

/* Clean metric cards (soft icon chip + muted label + bold value) */
.metric-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex: 0 0 auto;
}
.metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--gray-500);
}
.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.15;
}

/* Tables */
.table-container {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: auto;
    box-shadow: var(--shadow);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}
tr:hover {
    background: var(--gray-50);
}

/* Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.badge-success {
    background-color: var(--success-color);
    color: white;
}
.badge-warning {
    background-color: var(--warning-color);
    color: white;
}
.badge-danger {
    background-color: var(--danger-color);
    color: white;
}
.badge-info {
    background-color: var(--info-color);
    color: white;
}
.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn i {
    font-size: 1rem;
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-success {
    background-color: var(--success-color);
    color: white;
}
.btn-success:hover {
    background-color: #0d9488;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-danger {
    background-color: var(--danger-color);
    color: white;
}
.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-warning {
    background-color: var(--warning-color);
    color: white;
}
.btn-warning:hover {
    background-color: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}
.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1.5rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.alert i {
    font-size: 1.25rem;
}
.alert-success {
    background-color: var(--success-color);
    color: white;
}
.alert-danger {
    background-color: var(--danger-color);
    color: white;
}
.alert-warning {
    background-color: var(--warning-color);
    color: white;
}
.alert-info {
    background-color: var(--info-color);
    color: white;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
}
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1060;
    max-width: 500px;
    width: 90%;
    display: none;
}
.modal.show {
    display: block;
}
.modal.show + .modal-backdrop {
    display: block;
}
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h5 {
    margin: 0;
    color: var(--gray-800);
}
.modal-body {
    padding: 1.5rem;
}
.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Progress Bars */
.progress {
    height: 0.625rem;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Member Card */
.member-card {
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 350px;
    width: 550px;
    margin: 1rem auto;
}
.member-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}
.member-card-logo {
    margin-bottom: 2rem;
}
.member-card-logo img {
    height: 50px;
    filter: brightness(0) invert(1);
}
.member-card-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}
.member-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.member-card-details {
    position: relative;
    z-index: 1;
}
.member-card-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}
.member-card-number {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
    color: white;
}
.member-card-expiry {
    font-size: 0.875rem;
    opacity: 0.8;
    color: white;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    .member-card {
        width: 100%;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* Print Styles */
@media print {
    .sidebar,
    .header-actions,
    .btn,
    .footer,
    .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-bold { font-weight: 600; }
.fw-bolder { font-weight: 700; }

.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-white { color: white; }
.text-muted { color: var(--gray-500); }

.bg-primary { background-color: var(--primary-color); }
.bg-success { background-color: var(--success-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-info { background-color: var(--info-color); }
.bg-light { background-color: var(--light-color); }
.bg-dark { background-color: var(--dark-color); color: white; }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.border { border: 1px solid var(--gray-200); }
.border-top { border-top: 1px solid var(--gray-200); }
.border-bottom { border-bottom: 1px solid var(--gray-200); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fadeIn 0.5s ease;
}

.hover-lift {
    transition: var(--transition);
}
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--gray-100);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
