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

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-label {
    font-weight: 600;
    color: #333;
}

.login-form .form-control {
    border-radius: 5px;
    padding: 0.75rem;
    border: 1px solid #ddd;
}

.login-form .btn-primary {
    background: #667eea;
    border: none;
    padding: 0.75rem;
    border-radius: 5px;
    font-weight: 600;
}

/* Calendar Page Styles */
.calendar-events .card {
    border-left: 4px solid #667eea;
}

.calendar-events .card-title {
    color: #333;
    font-weight: 600;
}

.calendar-events .card-text {
    color: #666;
}

/* Tasks Page Styles */
.task-list .card {
    border-left: 4px solid #28a745;
}

.task-list .card.bg-light {
    border-left-color: #6c757d;
}

.task-list .form-check-input {
    cursor: pointer;
}

.task-list .badge {
    font-size: 0.75rem;
}

/* Contacts Page Styles */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.contact-card {
    border-left: 4px solid #17a2b8;
}

.avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #17a2b8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ActiveSync Page Styles */
.device-list .card.border-success {
    border-left: 4px solid #28a745;
}

.device-list .card.border-warning {
    border-left: 4px solid #ffc107;
}

.device-list .card.border-danger {
    border-left: 4px solid #dc3545;
}

.device-info .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.device-actions .btn-group-vertical .btn {
    margin-bottom: 0.25rem;
}

/* Common Styles */
.display-1 {
    font-size: 4rem;
    color: #dee2e6;
}

.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

.text-decoration-line-through {
    text-decoration: line-through;
}

/* Loading Container */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f8f9fa;
}

/* User Info */
.user-info {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Domains Page Styles */
.mailu-domains-page {
    padding: 1.5rem 0 2rem;
}

.mailu-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mailu-page-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    color: #2c3136;
}

.mailu-primary-action {
    min-width: 130px;
}

.mailu-alert {
    margin-bottom: 1rem;
}

.mailu-form-card,
.mailu-details-card,
.mailu-table-card {
    border: 1px solid #cfd8e3;
    box-shadow: 0 8px 24px rgba(24, 39, 75, 0.06);
}

.mailu-form-section {
    border: 1px solid #d9e1e8;
}

.mailu-form-section .card-body {
    border-top: 3px solid #57a5e5;
}

.mailu-form-section-success .card-body {
    border-top-color: #2db55d;
}

.mailu-section-title {
    margin-bottom: 1rem;
    color: #343a40;
    font-size: 1rem;
    font-weight: 600;
}

.mailu-table-card {
    overflow: hidden;
}

.mailu-table-card .card-body {
    border-top: 3px solid #57a5e5;
    padding: 1rem 0.875rem 1.25rem;
}

.mailu-table-toolbar,
.mailu-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0 0.125rem;
}

.mailu-table-toolbar {
    margin-bottom: 0.875rem;
}

.mailu-table-footer {
    margin-top: 0.875rem;
    color: #495057;
    font-size: 0.95rem;
}

.mailu-length-control,
.mailu-search-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #343a40;
}

.mailu-length-control select {
    width: 72px;
}

.mailu-search-control input {
    width: 210px;
}

.mailu-domain-table {
    margin-bottom: 0;
    border: 1px solid #d9e1e8;
}

.mailu-domain-table thead th {
    white-space: nowrap;
    background: #fff;
    border-bottom: 3px solid #d9e1e8;
    color: #2f343a;
    font-weight: 700;
    vertical-align: middle;
}

.mailu-domain-table tbody td {
    vertical-align: middle;
    color: #2f343a;
}

.mailu-domain-table tbody tr:hover {
    background: #fafcfe;
}

.mailu-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
}

.mailu-sort-indicator {
    color: #a0a9b4;
    font-size: 0.8rem;
}

.mailu-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
}

.mailu-icon-link {
    padding: 0;
    text-decoration: none;
    font-weight: 600;
    color: #57a5e5;
}

.mailu-icon-link:hover {
    color: #2f7fc1;
    text-decoration: underline;
}

.mailu-details-card .card-title,
.mailu-form-card .card-title {
    font-weight: 600;
}

.mailu-detail-label {
    margin-bottom: 0.2rem;
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mailu-detail-value {
    color: #2f343a;
    font-size: 0.98rem;
}

.mailu-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #6c757d;
}

.mailu-record-block {
    padding: 0.85rem 0;
    border-bottom: 1px solid #e9ecef;
}

.mailu-record-block:last-child {
    border-bottom: 0;
}

.mailu-record-name {
    margin-bottom: 0.35rem;
    color: #495057;
    font-weight: 600;
}

.mailu-record-value {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: #1f2937;
}

.mailu-zone-preview {
    margin: 0;
    max-height: 420px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    color: #1f2937;
    font-size: 0.92rem;
}

.mailu-quota-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mailu-quota-row .form-range {
    margin: 0;
}

.mailu-quota-badge {
    min-width: 72px;
    padding: 0.45rem 0.7rem;
    border: 1px solid #d9e1e8;
    border-radius: 0.4rem;
    background: #f8fafc;
    color: #495057;
    font-weight: 600;
    text-align: center;
}

.mailu-info-grid {
    display: grid;
    gap: 0.75rem;
}

.mailu-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #eef2f7;
}

.mailu-info-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mailu-antispam-frame {
    display: block;
    width: 100%;
    min-height: 78vh;
    border: 0;
    border-radius: 0 0 0.5rem 0.5rem;
    background: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        margin: 1rem;
    }

    .mailu-page-header,
    .mailu-table-toolbar,
    .mailu-table-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .mailu-search-control input,
    .mailu-length-control select,
    .mailu-primary-action {
        width: 100%;
    }

    .mailu-info-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}
