:root { --tracker-primary: #00abe2; --tracker-primary-dark: #0090c0; --tracker-primary-light: #e8f7fc; }

/* Admin Control Panel – mp3quran torrent tracker */
.acp-shell {
    max-width: 1180px;
    margin: 0 auto 32px;
    padding: 0 16px 24px;
    font-family: neosans, Tahoma, Arial, sans-serif;
    color: #1f2937;
    line-height: 1.5;
}

.acp-shell a {
    text-decoration: none;
}

.acp-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 24px;
    padding: 22px 26px;
    border-radius: 14px;
    background: linear-gradient(135deg, #007aa3 0%, #00abe2 55%, #20c4f0 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 171, 226, 0.22);
}

.acp-hero h1 {
    margin: 0 0 6px;
    font-size: 1.45rem;
    font-weight: 700;
}

.acp-hero p {
    margin: 0;
    opacity: 0.92;
    font-size: 0.95rem;
}

.acp-section-title {
    margin: 18px 0 12px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.acp-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.acp-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.acp-quick-card,
.acp-nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 92px;
    padding: 16px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.acp-quick-card:hover,
.acp-nav-card:hover {
    transform: translateY(-2px);
    border-color: #00abe2;
    box-shadow: 0 8px 20px rgba(0, 171, 226, 0.18);
    color: #007aa3;
}

.acp-quick-card.is-active,
.acp-nav-card.is-active {
    background: linear-gradient(135deg, #00abe2, #20c4f0);
    border-color: #0090c0;
    color: #1f2937;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(0, 171, 226, 0.28);
}

.acp-quick-card i,
.acp-nav-card i {
    font-size: 1.35rem;
    color: #00abe2;
}

.acp-quick-card.is-active i,
.acp-nav-card.is-active i {
    color: #1f2937;
}

.acp-quick-card span,
.acp-nav-card span {
    font-size: 0.88rem;
    line-height: 1.35;
}

/* Restyle legacy tracker tables inside admin */
.acp-shell > table.lista,
.acp-shell table.lista {
    width: 100% !important;
    margin: 16px 0 24px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: visible !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}

.acp-shell td.block,
.acp-shell TD.block {
    background: linear-gradient(135deg, #007aa3, #00abe2) !important;
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 14px 18px !important;
    border: none !important;
    height: auto !important;
}

.acp-shell td.header,
.acp-shell TD.header,
.acp-shell th.header {
    background: #f3f4f6 !important;
    color: #111827 !important;
    font-weight: 600 !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
    vertical-align: middle !important;
}

.acp-shell td.lista,
.acp-shell TD.lista {
    padding: 10px 12px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    background: #fff !important;
    vertical-align: middle !important;
}

.acp-shell tr:last-child td.lista,
.acp-shell tr:last-child TD.lista {
    border-bottom: none !important;
}

.acp-shell td.header a,
.acp-shell td.lista a,
.acp-shell TD.header a,
.acp-shell TD.lista a {
    color: #00abe2 !important;
    font-weight: 600;
}

.acp-shell td.header a:hover,
.acp-shell td.lista a:hover {
    color: #00abe2 !important;
}

.acp-shell input[type="text"],
.acp-shell input[type="password"],
.acp-shell input[type="number"],
.acp-shell select,
.acp-shell textarea {
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.acp-shell input[type="submit"],
.acp-shell input[type="button"],
.acp-shell button {
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #00abe2, #007aa3);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.acp-shell input[type="submit"]:hover,
.acp-shell input[type="button"]:hover,
.acp-shell button:hover {
    opacity: 0.9;
}

.acp-dashboard {
    padding: 8px 4px 16px;
}

.acp-dashboard-intro {
    text-align: center;
    margin: 8px 0 20px;
    color: #4b5563;
    font-size: 0.95rem;
}

.acp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin: 16px 0 24px;
}

.acp-stat-card {
    padding: 14px 16px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 0.92rem;
}

.acp-stat-card strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
}

.acp-ok {
    color: #0090c0 !important;
    font-weight: 700;
}

.acp-bad {
    color: #dc2626 !important;
    font-weight: 700;
}

.acp-shell .acp-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.acp-shell .acp-info-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.acp-shell .acp-info-table tr:last-child td {
    border-bottom: none;
}

.acp-shell .acp-info-table td:first-child {
    width: 180px;
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

@media (max-width: 768px) {
    .acp-hero {
        padding: 18px;
    }

    .acp-hero h1 {
        font-size: 1.2rem;
    }

    .acp-nav-grid,
    .acp-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Save / Cancel buttons - always visible */
.acp-shell form {
    margin-bottom: 24px;
}

.acp-shell form table.lista {
    overflow: visible !important;
}

.acp-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    margin: 0 0 16px;
    background: #fff;
    border: 2px solid #00abe2;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 171, 226, 0.15);
}

.acp-form-actions-bottom {
    position: sticky;
    bottom: 12px;
    z-index: 200;
    margin-top: 20px;
}

.acp-form-actions input[type="submit"],
.acp-form-actions input[type="button"],
.acp-form-actions button {
    min-width: 140px !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    border: none !important;
}

.acp-form-actions input[type="submit"] {
    background: linear-gradient(135deg, #00abe2, #0090c0) !important;
    color: #fff !important;
}

.acp-form-actions input[type="submit"][name="invia"],
.acp-form-actions input[type="submit"][value="Cancel"] {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.acp-shell form tr:has(input[type="submit"]) td.header,
.acp-shell form tr:has(input[type="submit"]) TD.header {
    background: #e8f7fc !important;
    padding: 16px !important;
    position: sticky;
    bottom: 0;
    z-index: 150;
}

.acp-shell form tr:has(input[type="submit"]) input[type="submit"] {
    min-width: 140px !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}


/* v4 - unified section blocks for all admin sub-pages */
.acp-page-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.acp-section {
    margin: 0 0 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.acp-section-heading {
    margin: 0;
    padding: 14px 18px;
    background: linear-gradient(135deg, #007aa3, #00abe2);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.acp-section-body {
    padding: 16px 18px 20px;
}

.acp-section-body > table.lista,
.acp-section-body table.lista,
.acp-section-body > table,
.acp-section-body table {
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.acp-section-body table[border="1"],
.acp-section-body table[border="0"] {
    border: 1px solid #e5e7eb !important;
    border-radius: 8px;
    overflow: hidden;
}

.acp-section-body td,
.acp-section-body th {
    padding: 8px 10px !important;
}

.acp-section-body td.header,
.acp-section-body th.header {
    background: #f3f4f6 !important;
    font-weight: 600;
}

.acp-section-body ul {
    margin: 8px 0;
    padding-left: 20px;
}

.acp-section-body h2 {
    font-size: 1.1rem;
    color: #111827;
    margin: 16px 0 10px;
}

.acp-section-body input[type="button"],
.acp-section-body input[type="submit"],
.acp-section-body button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #00abe2, #007aa3);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    margin: 2px;
}

.acp-section-body .upload-error,
.upload-error {
    margin: 12px 0;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.ucp-shell .acp-section:first-of-type .acp-section-heading { display: none; }
.ucp-shell .acp-section:first-of-type { border: none; box-shadow: none; background: transparent; }
.ucp-shell .acp-section:first-of-type .acp-section-body { padding: 0; }
