/* ==================== RESET & GENEL ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    transition: background 0.3s ease;
}

/* ==================== LOGIN SCREEN ==================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a2b4c 0%, #2c3e50 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 2000px;
    height: 2000px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201,162,61,0.1) 0%, rgba(201,162,61,0.05) 100%);
    top: -1000px;
    right: -500px;
    transform: rotate(45deg);
}

.login-container::after {
    content: '';
    position: absolute;
    width: 2000px;
    height: 2000px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201,162,61,0.1) 0%, rgba(201,162,61,0.02) 100%);
    bottom: -1000px;
    left: -500px;
    transform: rotate(45deg);
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 50px 40px;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.2);
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo svg {
    width: 180px;
    height: 70px;
}

.login-logo h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-top: 15px;
    background: linear-gradient(135deg, #1a2b4c, #c9a23d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    transition: all 0.3s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e1e1e1;
    border-radius: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #c9a23d;
    box-shadow: 0 5px 20px rgba(201,162,61,0.2);
}

.input-wrapper input:focus + i {
    color: #c9a23d;
}

.captcha-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.captcha-text {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 8px;
    color: #1a2b4c;
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    user-select: none;
    background: linear-gradient(135deg, #f6f8fa, #ffffff);
    border: 2px solid #c9a23d;
}

.captcha-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    text-align: center;
    text-transform: uppercase;
}

.captcha-refresh {
    margin-top: 10px;
    color: #c9a23d;
    cursor: pointer;
    font-size: 14px;
}

.captcha-refresh i {
    margin-right: 5px;
}

.captcha-refresh:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1a2b4c, #2c3e50);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #c9a23d, #b38f2e);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201,162,61,0.4);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    min-height: 20px;
}

.security-badge {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #999;
}

.security-badge i {
    color: #27ae60;
    margin-right: 5px;
}

/* ==================== ADMIN PANEL ==================== */
.admin-panel {
    display: none;
    min-height: 100vh;
    background: #f0f2f5;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    color: #c9a23d;
    cursor: pointer;
}

.top-bar-left h1 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.top-bar-left h1 span {
    background: linear-gradient(135deg, #1a2b4c, #c9a23d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 14px;
    margin-left: 8px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.session-timer {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
}

.session-timer i {
    color: #c9a23d;
    margin-right: 5px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-profile:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.admin-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a2b4c, #c9a23d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.admin-info {
    line-height: 1.3;
}

.admin-info .name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.admin-info .role {
    font-size: 12px;
    color: #999;
}

.logout-btn {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.logout-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
}

/* Main Container */
.main-container {
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    min-height: calc(100vh - 70px);
    box-shadow: 2px 0 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.sidebar-menu {
    padding: 25px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: #666;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.menu-item i {
    width: 24px;
    font-size: 18px;
}

.menu-item:hover {
    background: #f8f9fa;
    color: #c9a23d;
    padding-left: 30px;
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(201,162,61,0.1), transparent);
    color: #c9a23d;
    border-left-color: #c9a23d;
}

.menu-item span {
    font-weight: 500;
}

.menu-item .badge {
    margin-left: auto;
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 12px;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 30px;
    background: #f0f2f5;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1a2b4c15, #c9a23d15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 32px;
    background: linear-gradient(135deg, #1a2b4c, #c9a23d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-info h3 {
    font-size: 14px;
    color: #999;
    font-weight: 500;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-info p {
    font-size: 32px;
    font-weight: 800;
    color: #333;
    line-height: 1.2;
}

/* Messages Section */
.messages-section {
    background: white;
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    transition: background 0.3s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 20px;
    color: #333;
    font-weight: 700;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid #e1e1e1;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.filter-btn.active {
    background: linear-gradient(135deg, #1a2b4c, #c9a23d);
    color: white;
    border-color: transparent;
}

.filter-btn:hover:not(.active) {
    background: #f8f9fa;
    border-color: #999;
    transform: translateY(-2px);
}

.refresh-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e1e1e1;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #c9a23d;
}

.refresh-btn:hover {
    background: #c9a23d;
    color: white;
    border-color: #c9a23d;
    transform: rotate(180deg);
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: 15px;
}

.messages-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.messages-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.messages-table th:first-child {
    border-radius: 15px 0 0 0;
}

.messages-table th:last-child {
    border-radius: 0 15px 0 0;
}

.messages-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    font-size: 14px;
    vertical-align: middle;
}

.messages-table tr:hover td {
    background: #f8f9fa;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-unread {
    background: #fff3cd;
    color: #856404;
}

.status-read {
    background: #d4edda;
    color: #155724;
}

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.view-btn {
    background: #e3f2fd;
    color: #1976d2;
}

.view-btn:hover {
    background: #1976d2;
    color: white;
    transform: scale(1.05);
}

.delete-btn {
    background: #ffebee;
    color: #c62828;
}

.delete-btn:hover {
    background: #c62828;
    color: white;
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 25px;
    padding: 35px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

.modal h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #1a2b4c, #c9a23d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.message-detail {
    margin-bottom: 20px;
}

.message-detail strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.message-detail p {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    word-break: break-word;
}

.message-date {
    color: #999;
    font-size: 12px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 60px;
    color: #c9a23d;
}

.loading i {
    font-size: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Security Logs Modal */
.security-log {
    background: #1e1e2f;
    color: #00ff00;
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    margin-bottom: 8px;
    border-left: 3px solid #c9a23d;
}

.security-log .time {
    color: #888;
    margin-right: 10px;
}

.security-log .type {
    background: #c9a23d;
    color: #1a2b4c;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 10px;
}

/* Stats Chart */
.stats-chart {
    background: white;
    border-radius: 25px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}

.stats-chart h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 99;
        height: 100vh;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 15px 20px;
    }
    
    .admin-info, .session-timer {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-content {
        padding: 25px;
    }

    .login-box {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
        text-align: center;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c9a23d;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b38f2e;
}

/* Print Styles */
@media print {
    .top-bar, .sidebar, .filter-group, .refresh-btn, .action-btns, .modal {
        display: none !important;
    }
    
    .messages-section {
        box-shadow: none;
        padding: 0;
    }
    
    .content-area {
        padding: 0;
    }
}