/* Proser Admin Paneli CSS */

:root {
    --a-primary: #df0a0a;
    --a-primary-dark: #b50808;
    --a-dark: #0F0D1D;
    --a-bg: #f4f5f7;
    --a-white: #ffffff;
    --a-border: #e2e5ed;
    --a-text: #334770;
    --a-text-light: #6b7a99;
    --a-success: #27ae60;
    --a-warning: #f39c12;
    --a-danger: #e74c3c;
    --a-info: #2980b9;
    --sidebar-w: 260px;
    --header-h: 64px;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(15,13,29,0.08);
    --transition: all 0.25s ease;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; }
body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-size: 1.4rem;
    color: var(--a-text);
    background: var(--a-bg);
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input,select,textarea { font-family: inherit; }

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

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--a-dark);
    min-height: 100vh;
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.sidebar-logo {
    padding: 2rem 2.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.sidebar-logo img { height: 36px; filter: brightness(0) invert(1); }
.sidebar-logo .brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.sidebar-logo .sub { font-size: 1.1rem; color: rgba(255,255,255,0.45); }
.sidebar-menu {
    flex: 1;
    padding: 1.6rem 0;
    overflow-y: auto;
}
.menu-section {
    padding: 1.6rem 2rem 0.8rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.1rem 2.4rem;
    color: rgba(255,255,255,0.65);
    font-size: 1.4rem;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 0;
    position: relative;
}
.menu-item i {
    font-size: 1.7rem;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}
.menu-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}
.menu-item.active {
    color: #fff;
    background: rgba(223,10,10,0.2);
}
.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--a-primary);
    border-radius: 0 2px 2px 0;
}
.menu-badge {
    margin-left: auto;
    background: var(--a-primary);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    min-width: 2rem;
    text-align: center;
}
.sidebar-footer {
    padding: 1.6rem 2.4rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.sidebar-user-avatar {
    width: 3.6rem;
    height: 3.6rem;
    background: var(--a-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}
.sidebar-user-info .name { color: #fff; font-size: 1.4rem; font-weight: 600; }
.sidebar-user-info .role { font-size: 1.1rem; color: rgba(255,255,255,0.45); }
.sidebar-logout {
    margin-left: auto;
    color: rgba(255,255,255,0.4);
    font-size: 1.6rem;
    transition: var(--transition);
}
.sidebar-logout:hover { color: var(--a-primary); }

/* ---- Main content ---- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.admin-header {
    background: var(--a-white);
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 2.4rem;
    border-bottom: 1px solid var(--a-border);
    gap: 1.6rem;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow);
}
.admin-header h2 {
    font-size: 1.8rem;
    color: var(--a-dark);
    flex: 1;
}
.admin-header-actions { display: flex; align-items: center; gap: 1.2rem; }
.admin-content {
    flex: 1;
    padding: 2.4rem;
}

/* ---- Cards ---- */
.card {
    background: var(--a-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    padding: 1.8rem 2rem;
    border-bottom: 1px solid var(--a-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.card-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--a-dark);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.card-header h3 i { color: var(--a-primary); font-size: 1.8rem; }
.card-body { padding: 2rem; }
.card-footer {
    padding: 1.4rem 2rem;
    border-top: 1px solid var(--a-border);
    background: var(--a-bg);
}

/* ---- Stats ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
    margin-bottom: 2.4rem;
}
.stat-card {
    background: var(--a-white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.6rem;
    border-left: 4px solid transparent;
}
.stat-card.red { border-left-color: var(--a-primary); }
.stat-card.blue { border-left-color: var(--a-info); }
.stat-card.green { border-left-color: var(--a-success); }
.stat-card.orange { border-left-color: var(--a-warning); }
.stat-icon {
    width: 5rem;
    height: 5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    flex-shrink: 0;
}
.stat-card.red .stat-icon { background: rgba(223,10,10,0.1); color: var(--a-primary); }
.stat-card.blue .stat-icon { background: rgba(41,128,185,0.1); color: var(--a-info); }
.stat-card.green .stat-icon { background: rgba(39,174,96,0.1); color: var(--a-success); }
.stat-card.orange .stat-icon { background: rgba(243,156,18,0.1); color: var(--a-warning); }
.stat-num { font-size: 2.8rem; font-weight: 800; color: var(--a-dark); line-height: 1; }
.stat-lbl { font-size: 1.3rem; color: var(--a-text-light); margin-top: 0.3rem; }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--a-bg); }
th {
    padding: 1.2rem 1.6rem;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--a-text-light);
    border-bottom: 1px solid var(--a-border);
    white-space: nowrap;
}
td {
    padding: 1.2rem 1.6rem;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--a-border);
    vertical-align: middle;
}
tbody tr:hover { background: rgba(223,10,10,0.02); }
tbody tr:last-child td { border-bottom: none; }
.table-actions { display: flex; gap: 0.6rem; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.8rem;
    border-radius: 6px;
    font-size: 1.4rem;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}
.btn-primary { background: var(--a-primary); color: #fff; }
.btn-primary:hover { background: var(--a-primary-dark); }
.btn-success { background: var(--a-success); color: #fff; }
.btn-success:hover { background: #219a52; }
.btn-danger { background: var(--a-danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: var(--a-warning); color: #fff; }
.btn-warning:hover { background: #e67e22; }
.btn-info { background: var(--a-info); color: #fff; }
.btn-info:hover { background: #2471a3; }
.btn-secondary { background: var(--a-bg); color: var(--a-text); border-color: var(--a-border); }
.btn-secondary:hover { background: var(--a-border); }
.btn-sm { padding: 0.5rem 1.2rem; font-size: 1.2rem; }
.btn-icon { padding: 0.7rem; border-radius: 6px; width: 3.4rem; height: 3.4rem; justify-content: center; }

/* ---- Form ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.form-group { margin-bottom: 1.8rem; }
.form-group label {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--a-dark);
    margin-bottom: 0.6rem;
}
.form-group label .req { color: var(--a-primary); }
.form-control {
    width: 100%;
    padding: 1rem 1.4rem;
    border: 1.5px solid var(--a-border);
    border-radius: 6px;
    font-size: 1.4rem;
    color: var(--a-text);
    background: var(--a-white);
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--a-primary);
    box-shadow: 0 0 0 3px rgba(223,10,10,0.08);
}
.form-control.error { border-color: var(--a-danger); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 1.2rem; color: var(--a-text-light); margin-top: 0.4rem; }
.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--a-border);
    margin-top: 2rem;
}

/* ---- Alerts ---- */
.alert {
    padding: 1.2rem 1.6rem;
    border-radius: 6px;
    font-size: 1.4rem;
    margin-bottom: 1.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.alert i { font-size: 1.6rem; flex-shrink: 0; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid var(--a-success); }
.alert-danger { background: #f8d7da; color: #721c24; border-left: 4px solid var(--a-danger); }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--a-warning); }
.alert-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid var(--a-info); }

/* ---- Badge ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
}
.badge-success { background: #d4edda; color: var(--a-success); }
.badge-danger { background: #f8d7da; color: var(--a-danger); }
.badge-warning { background: #fff3cd; color: var(--a-warning); }
.badge-secondary { background: var(--a-bg); color: var(--a-text-light); }

/* ---- Login ---- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--a-dark);
    background-image: radial-gradient(circle at 80% 20%, rgba(223,10,10,0.15) 0%, transparent 50%);
    padding: 2rem;
}
.login-box {
    background: var(--a-white);
    border-radius: 16px;
    padding: 4rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.4);
}
.login-logo {
    text-align: center;
    margin-bottom: 3rem;
}
.login-logo img { height: 50px; margin: 0 auto 1.2rem; }
.login-logo h1 { font-size: 2.2rem; color: var(--a-dark); }
.login-logo p { font-size: 1.4rem; color: var(--a-text-light); }
.login-btn {
    width: 100%;
    padding: 1.3rem;
    background: var(--a-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0.8rem;
}
.login-btn:hover { background: var(--a-primary-dark); }

/* ---- Image grid ---- */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.2rem;
}
.image-item {
    position: relative;
    border: 2px solid var(--a-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--a-bg);
}
.image-item:hover { border-color: var(--a-primary); }
.image-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.image-item-info {
    padding: 0.8rem;
    font-size: 1.2rem;
    color: var(--a-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.image-item-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.4rem;
    opacity: 0;
    transition: var(--transition);
}
.image-item:hover .image-item-actions { opacity: 1; }

/* ---- Upload zone ---- */
.upload-zone {
    border: 2px dashed var(--a-border);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--a-bg);
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--a-primary);
    background: rgba(223,10,10,0.02);
}
.upload-zone i { font-size: 3.6rem; color: var(--a-primary); margin-bottom: 1rem; display: block; }
.upload-zone p { color: var(--a-text-light); font-size: 1.4rem; }
.upload-zone p strong { color: var(--a-primary); }

/* ---- Toggle switch ---- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 4.4rem;
    height: 2.4rem;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--a-border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 1.8rem;
    height: 1.8rem;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--a-success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(2rem); }

/* ---- Progress ---- */
.progress { background: var(--a-bg); border-radius: 50px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--a-primary); border-radius: 50px; transition: width 0.4s ease; }

/* ---- Messages ---- */
.msg-item {
    display: flex;
    gap: 1.4rem;
    padding: 1.6rem;
    border-radius: var(--radius);
    background: var(--a-white);
    border: 1px solid var(--a-border);
    margin-bottom: 1.2rem;
    transition: var(--transition);
}
.msg-item.unread { border-left: 4px solid var(--a-primary); }
.msg-item:hover { box-shadow: var(--shadow); }
.msg-avatar {
    width: 4rem;
    height: 4rem;
    background: rgba(223,10,10,0.1);
    color: var(--a-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.msg-content { flex: 1; min-width: 0; }
.msg-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.msg-name { font-weight: 700; color: var(--a-dark); }
.msg-subject { color: var(--a-text-light); font-size: 1.3rem; }
.msg-time { margin-left: auto; font-size: 1.2rem; color: var(--a-text-light); white-space: nowrap; }
.msg-text { font-size: 1.3rem; color: var(--a-text-light); margin-top: 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-actions { display: flex; gap: 0.6rem; align-items: flex-start; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .admin-content { padding: 1.4rem; }
}
