/* Base Styles */
:root {
    --primary: #333333;
    --success: #666666;
    --info: #888888;
    --warning: #999999;
    --danger: #222222;
    --secondary: #777777;
    --light: #f5f5f5;
    --dark: #111111;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #4e73df;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.35rem;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #333333;
    color: white;
}

.btn-primary:hover {
    background-color: #111111;
}

.btn-danger {
    background-color: #222222;
    color: white;
}

.btn-danger:hover {
    background-color: #000000;
}

.btn-success {
    background-color: #666666;
    color: white;
}

.btn-success:hover {
    background-color: #444444;
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.35rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo img {
    max-width: 150px;
    margin-bottom: 1.5rem;
}

.login-box h2 {
    margin-bottom: 1.5rem;
    color: #5a5c69;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #4e73df;
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background-color: #4e73df;
    color: white;
    border: none;
    border-radius: 0.35rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #2e59d9;
}

/* Admin Dashboard */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #111111 0%, #333333 100%);
    color: #ffffff;
    padding: 1.5rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;

}

.user-profile {
    text-align: center;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.avatar {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.user-profile h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.user-profile p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.sidebar nav ul {
    list-style: none;
    padding: 1.5rem 0;
}

.sidebar nav ul li {
    margin-bottom: 0.5rem;
}

.sidebar nav ul li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #cccccc;
    transition: all 0.3s;
}

.sidebar nav ul li a:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.1);
}

.sidebar nav ul li a i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.sidebar nav ul li.active a {
    color: #ffffff;
    background-color: rgba(255,255,255,0.1);
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    margin-left: 250px;
    width: calc(100% - 250px);
}

.header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e3e6f0;
}

.header h1 {
    font-size: 1.75rem;
    color: #111111;
}

.stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 120px;
    background: white;
    padding: 1.5rem;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    border-left: 0.25rem solid #4e73df;
}

.stat-card h3 {
    font-size: 1.5rem;
    color: #111111;
}

.stat-card p {
    color: #666666;
    font-size: 0.85rem;
}

.stat-card.total {
    border-left-color: #5a5c69;
}

.stat-card[data-type="contabo"] {
    border-left-color: #4e73df;
}

.stat-card[data-type="mailcow"] {
    border-left-color: #1cc88a;
}

.stat-card[data-type="postal"] {
    border-left-color: #36b9cc;
}

.stat-card[data-type="g-suite"] {
    border-left-color: #f6c23e;
}

.stat-card[data-type="dheera"] {
    border-left-color: #e74a3b;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.user-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.user-card:hover {
    transform: translateY(-5px);
}

.user-avatar {
    width: 60px;
    height: 60px;
    background-color: #f5f5f5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333333;
    margin: 0 auto 1rem;
}

.user-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #111111;
}

.id-count {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.btn-view {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #333333;
    color: white;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    transition: background-color 0.3s;
}

.btn-view:hover {
    background-color: #111111;  
}

/* BD Dashboard */
.bd-dashboard {
    display: flex;
    min-height: 100vh;
}

/* Dashboard Controls */
.dashboard-controls {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.search-bar {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    transition: all 0.3s;
}

.search-bar input:focus {
    border-color: #4e73df;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #858796;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    color: #858796;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background-color: #f8f9fc;
}

.filter-btn.active {
    background-color: #4e73df;
    color: white;
    border-color: #4e73df;
}

/* IDs Table */
.ids-table-container {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-top: 1rem;
}

.ids-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.ids-table th {
    background-color: #f8f9fc;
    padding: 1rem;
    text-align: left;
    font-weight: bold;
    color: #5a5c69;
    border-bottom: 1px solid #e3e6f0;
}

.ids-table td {
    padding: 1rem;
    border-bottom: 1px solid #e3e6f0;
    color: #858796;
}

.ids-table tr:last-child td {
    border-bottom: none;
}

.ids-table tr:hover td {
    background-color: #f8f9fc;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    color: #333333 !important;
    font-size: 0.75rem;
    font-weight: bold;
    background-color: #e0e0e0 !important;
}

.email-domain .email {
    font-weight: 500;
    color: #5a5c69;
}

.email-domain .domain {
    font-size: 0.85rem;
    color: #858796;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
    background-color: #e0e0e0 !important;
    color: #333333 !important;
}

.status-badge.active {
    background-color: #d1e7dd;
    color: #0f5132;
}

.btn-view, .btn-download {
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-view {
    background-color: #4e73df;
    color: white;
    margin-right: 0.5rem;
    text-decoration: none;
}

.btn-view:hover {
    background-color: #2e59d9;
}

.btn-download {
    background-color: #1cc88a;
    color: white;
}

.btn-download:hover {
    background-color: #17a673;
}

.no-ids {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.no-ids i {
    font-size: 3rem;
    color: #858796;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-ids h3 {
    margin-bottom: 0.5rem;
    color: #5a5c69;
}

.no-ids p {
    color: #858796;
}

/* Credentials Page */
.credentials-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.credentials-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e3e6f0;
}

.credentials-header h1 {
    color: #5a5c69;
}

.btn-back {
    padding: 0.5rem 1rem;
    background-color: #858796;
    color: white;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-back:hover {
    background-color: #6c757d;
}

.credentials-card {
    margin-bottom: 2rem;
}

.credential-row {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.credential-row:last-child {
    border-bottom: none;
}

.credential-label {
    flex: 0 0 200px;
    font-weight: bold;
    color: #5a5c69;
}

.credential-value {
    flex: 1;
    color: #858796;
    word-break: break-all;
}

.section-divider {
    margin: 1.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e3e6f0;
    position: relative;
}

.section-divider span {
    background: white;
    padding: 0 0.5rem;
    position: relative;
    top: 0.5rem;
    color: #4e73df;
    font-weight: bold;
}

.credentials-actions {
    text-align: center;
}

.btn-copy {
    padding: 0.75rem 1.5rem;
    background-color: #4e73df;
    color: white;
    border: none;
    border-radius: 0.35rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-copy:hover {
    background-color: #2e59d9;
}

.btn-copy i {
    margin-right: 0.5rem;
}

/* Manage Users Page */
.user-details {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.back-link {
    margin-bottom: 1rem;
}

.back-link a {
    color: #858796;
    font-size: 0.9rem;
}

.back-link a i {
    margin-right: 0.5rem;
}

.user-profile-card {
    text-align: center;
    padding: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e3e6f0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background-color: #f8f9fc;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #4e73df;
    margin: 0 auto 1rem;
}

.user-profile-card h2 {
    margin-bottom: 0.5rem;
    color: #5a5c69;
}

.user-profile-card p {
    color: #858796;
}

.assigned-ids-table {
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background-color: #ffffff;
}

table th {
    background-color: #f5f5f5;
    padding: 0.75rem;
    text-align: left;
    font-weight: bold;
    color: #111111;
    border-bottom: 1px solid #e0e0e0;
}

table td {
    padding: 0.75rem;
    color: #666666;
    border-bottom: 1px solid #e0e0e0;
}

table tr:hover td {
    background-color: #f9f9f9;
}

.btn-deassign {
    padding: 0.25rem 0.5rem;
    background-color: #e74a3b;
    color: white;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    transition: background-color 0.3s;
}

.btn-deassign:hover {
    background-color: #be2617;
}

/* Add IDs Page */
.add-id-form {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #5a5c69;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #4e73df;
    outline: none;
}

.form-hint {
    color: #858796;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.btn-submit {
    padding: 0.75rem 1.5rem;
    background-color: #4e73df;
    color: white;
    border: none;
    border-radius: 0.35rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #2e59d9;
}

/* View All IDs Page */
.filter-options {
    margin-bottom: 1.5rem;
}

.filter-options label {
    margin-right: 0.5rem;
    font-weight: bold;
}

.filter-options select {
    padding: 0.5rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-badge.assigned {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-badge.unassigned {
    background-color: #fff3cd;
    color: #856404;
}

/* Assign IDs Page */
.assign-ids-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.unassigned-ids,
.assigned-ids {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.unassigned-ids h2,
.assigned-ids h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e3e6f0;
    color: #5a5c69;
}

.ids-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.id-card {
    background: white;
    padding: 1rem;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    border-left: 5px solid #4e73df;
}

.id-type {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.id-email {
    color: #858796;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    word-break: break-all;
}

.id-card select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.25rem;
    font-size: 0.85rem;
}

.btn-assign {
    width: 100%;
    padding: 0.5rem;
    background-color: #1cc88a;
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-assign:hover {
    background-color: #17a673;
}

.assigned-list {
    display: grid;
    gap: 1rem;
}

.assigned-item {
    padding: 1rem;
    border-radius: 0.35rem;
    background-color: #f8f9fc;
    border-left: 4px solid #1cc88a;
}

.item-type {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.item-email {
    color: #858796;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.item-assigned-to {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #5a5c69;
}

/* Responsive */
@media (max-width: 992px) {
    .assign-ids-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .users-grid,
    .ids-grid {
        grid-template-columns: 1fr;
    }
}

/* Add these styles to your existing CSS */
.ids-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.ids-table th, .ids-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e3e6f0;
}

.ids-table th {
    background-color: #f8f9fc;
    font-weight: 600;
    color: #5a5c69;
}

.ids-table tr:hover td {
    background-color: #f8f9fc;
}

.email-domain {
    display: flex;
    flex-direction: column;
}

.email-domain .email {
    font-weight: 500;
    color: #5a5c69;
}

.email-domain .domain {
    font-size: 0.85rem;
    color: #858796;
    margin-top: 0.25rem;
}

/* Darker card backgrounds */
.card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Darker table styles */
table {
    background-color: #ffffff;
}

table th {
    background-color: #f0f2f5;
    color: #4a4c55;
}

/* Darker button hover states */
.btn-primary:hover {
    background-color: #2a4bc4;
}

.btn-success:hover {
    background-color: #148a65;
}

.btn-danger:hover {
    background-color: #a51e12;
}

/* Darker sidebar */
.sidebar {
    background: linear-gradient(180deg, #3a5bd9 10%, #1a3ab5 100%);
}

/* Darker user cards */
.user-card {
    background: #ffffff;
    border: 1px solid #e0e3e7;
}

/* Darker stat cards */
.stat-card {
    background: #ffffff;
    border-left: 4px solid #333333;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}