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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #ff6b35;
    color: white;
}

.btn-primary:hover {
    background: #e55a2b;
}

.btn-secondary {
    background: #ddd;
    color: #333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn.active {
    background: #ff6b35;
    color: white;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    color: #ff6b35;
    margin-bottom: 10px;
}

.login-box p {
    color: #999;
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.login-footer {
    margin-top: 20px;
    color: #999;
    font-size: 12px;
}

/* Directory Page */
.directory-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar h3 {
    color: #ff6b35;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.directory-main {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.directory-header {
    margin-bottom: 30px;
}

.directory-header h1 {
    color: #ff6b35;
    margin-bottom: 20px;
}

.directory-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-toggle .btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
}

.view-toggle .btn.active {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

.results-count {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

/* Members Grid (Card View) */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.member-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.member-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.member-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #ff6b35;
}

.member-card h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
}

.badge {
    display: inline-block;
    background: #fff3e0;
    color: #ff6b35;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
    font-weight: 600;
}

.member-card .city,
.member-card .mobile {
    font-size: 13px;
    color: #666;
    margin: 8px 0;
}

/* Members Table (List View) */
.members-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.members-table thead {
    background: #f5f5f5;
}

.members-table th,
.members-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.members-table th {
    font-weight: 600;
    color: #333;
}

.members-table tbody tr:hover {
    background: #f9f9f9;
}

.members-table .link {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.alert-info {
    background: #e8f4f8;
    color: #0066cc;
    border-left: 4px solid #0066cc;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .directory-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .directory-controls {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .members-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
