* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at left, rgba(255, 0, 76, 0.25), transparent 30%),
        radial-gradient(circle at right, rgba(0, 89, 255, 0.25), transparent 30%),
        linear-gradient(90deg, #060b1f 0%, #03091c 50%, #040a22 100%);
    color: #fff;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

.admin-bg {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.admin-bg::before,
.admin-bg::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 65%;
    background-image:
        linear-gradient(rgba(29, 78, 216, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 78, 216, 0.15) 1px, transparent 1px);
    background-size: 32px 32px;
    transform: perspective(800px) rotateX(75deg);
    transform-origin: bottom;
    pointer-events: none;
}

.container {
    width: 1180px;
    max-width: calc(100% - 32px);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
}

.login-card,
.footer-card,
.main-panel,
.modal-content {
    background: rgba(3, 12, 35, 0.95);
    border: 1px solid rgba(74, 114, 255, 0.25);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.login-card {
    width: 420px;
    max-width: calc(100% - 24px);
    padding: 34px 28px;
}

.logo-box {
    text-align: center;
    margin-bottom: 18px;
}

.logo-box img {
    width: 90px;
    max-width: 100%;
    display: block;
    margin: 0 auto 12px;
}

.logo-box h1,
.logo-box h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.logo-box p {
    margin: 8px 0 0;
    color: #a9b3c7;
    font-size: 14px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #cbd5e1;
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid rgba(109, 140, 255, 0.25);
    background: #07132f;
    color: #fff;
    border-radius: 12px;
    padding: 14px 14px;
    outline: none;
    font-size: 14px;
}

.form-textarea {
    min-height: 90px;
    resize: vertical;
}

.form-control::placeholder,
.form-textarea::placeholder {
    color: #7f8aa4;
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    transition: 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(90deg, #3b5cff 0%, #2d49ea 100%);
    box-shadow: 0 10px 30px rgba(50, 89, 255, 0.3);
}

.btn-danger {
    background: #e85b4f;
}

.btn-success {
    background: #4fc05f;
}

.btn-info {
    background: #1e90ff;
}

.btn-dark {
    background: #111827;
    color: #dbeafe;
}

.btn-light {
    background: #e5e7eb;
    color: #111827;
}

.btn-sm {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.footer-card {
    width: 420px;
    max-width: calc(100% - 24px);
    padding: 22px;
    text-align: center;
}

.footer-card p {
    margin: 8px 0;
    color: #b9c2d8;
    font-size: 14px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand-title {
    font-size: 17px;
    font-weight: 800;
}

.brand-subtitle {
    color: #a7b2cb;
    font-size: 13px;
    margin-top: 2px;
}

.main-panel {
    margin: 22px auto 40px;
    overflow: hidden;
}

.panel-body {
    padding: 16px 16px 26px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.info-card {
    border: 1px solid rgba(107, 114, 128, 0.28);
    background: #06112c;
    border-radius: 16px;
    padding: 16px 18px;
}

.info-label {
    color: #d6dde9;
    font-size: 13px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.info-value {
    font-size: 17px;
    font-weight: 800;
}

.expire-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tabs {
    display: flex;
    gap: 2px;
    margin: 10px 0 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tab-link {
    display: inline-block;
    padding: 14px 20px;
    border-radius: 12px 12px 0 0;
    background: rgba(255,255,255,0.04);
    color: #22c7ff;
    font-weight: 700;
}

.tab-link.active {
    color: #fff;
    background: linear-gradient(180deg, rgba(35,132,255,0.45), rgba(35,132,255,0.20));
    box-shadow: inset 0 -2px 0 #fff;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0 12px;
    gap: 12px;
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

.filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.table th,
.table td {
    padding: 12px 10px;
    border: 1px solid rgba(255,255,255,0.18);
    text-align: left;
    font-size: 14px;
}

.table th {
    background: rgba(255,255,255,0.03);
    font-weight: 800;
}

.table td {
    color: #f2f5fb;
}

.action-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.muted {
    color: #b6c0d4;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.28);
    color: #d1fae5;
}

.alert-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.28);
    color: #fee2e2;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 600px;
    max-width: 100%;
    overflow: hidden;
}

.modal-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
}

.modal-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.modal-body {
    padding: 18px;
}

.modal-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0;
}

.checkbox-row input {
    margin-top: 4px;
}

.small-note {
    color: #b7c1d9;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .info-grid,
    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .section-head,
    .expire-row {
        flex-direction: column;
        align-items: stretch;
    }

    .tabs {
        overflow-x: auto;
    }
}
