/* MikroTik Hotspot Custom Styles - MCNP-ISAP EagleNet v.2 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

/* Login & Logout Pages - Keep original style */
body:not(.status-page) {
    background: linear-gradient(135deg, #800020 0%, #000080 100%);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

body.lite {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

body.dark {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    color: #fff;
}

/* Status Page - Landing Style */
body.status-page {
    background: #f5f7fa;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.ie-fixMinHeight {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px 35px;
    animation: fadeIn 0.5s ease-in-out;
}

body.dark .wrap {
    background: #2d2d2d;
    color: #fff;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

.fadeIn {
    animation-name: fadeIn;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section - Landing Page */
.landing-header {
    background: linear-gradient(135deg, #800020 0%, #000080 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
}

.landing-brand-title {
    font-size: 36px;
    font-weight: 700;
    margin: 15px 0 10px;
    color: white;
}

.landing-tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Welcome Bar - Compact */
.welcome-bar {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-text {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.connection-badge {
    font-size: 14px;
    color: #10b981;
    font-weight: 600;
    background: #ecfdf5;
    padding: 5px 15px;
    border-radius: 20px;
}

/* Info Section */
.info-section {
    padding: 40px 20px;
    background: #f5f7fa;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 3px solid #800020;
    padding-bottom: 10px;
    display: inline-block;
    width: 100%;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
    border-left: 4px solid #000080;
}

.info-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.logout-form {
    text-align: center;
    margin-top: 20px;
}

.btn-logout {
    width: auto;
    min-width: 200px;
    padding: 14px 40px;
    background: linear-gradient(135deg, #800020 0%, #000080 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128, 0, 32, 0.4);
}

/* Compact Info Section - Collapsible */
.compact-info-section {
    padding: 20px;
    background: #f9fafb;
}

.info-details {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
}

.info-summary {
    padding: 15px 20px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1f2937;
    user-select: none;
    transition: all 0.3s ease;
}

.info-summary:hover {
    background: #f9fafb;
}

.info-summary::-webkit-details-marker {
    display: none;
}

.info-summary::before {
    content: '▼';
    font-size: 12px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.info-details[open] .info-summary::before {
    transform: rotate(180deg);
}

.summary-info {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.compact-info-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    border-top: 1px solid #e5e7eb;
}

.compact-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 14px;
}

.compact-label {
    font-weight: 600;
    color: #6b7280;
}

.compact-value {
    font-weight: 500;
    color: #1f2937;
}

.compact-logout {
    padding: 15px 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.btn-compact-logout {
    width: auto;
    min-width: 180px;
    padding: 10px 30px;
    background: linear-gradient(135deg, #800020 0%, #000080 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-compact-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 0, 32, 0.4);
}

/* Resources Section */
.resources-section {
    padding: 50px 20px 40px;
    background: white;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.resource-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 140px;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(128, 0, 32, 0.15);
    border-color: #800020;
    background: white;
}

.card-icon {
    font-size: 42px;
    margin-bottom: 12px;
    display: block;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    line-height: 1.4;
}

/* Footer */
.landing-footer {
    background: #1f2937;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer-content {
    margin-bottom: 20px;
}

.footer-text {
    font-size: 14px;
    color: #d1d5db;
    margin-bottom: 10px;
}

.footer-link {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #800020 0%, #000080 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128, 0, 32, 0.4);
}

.footer-copyright {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 15px;
}

/* Logo */
.logo {
    width: 140px;
    height: auto;
    margin: 0 auto 25px;
    display: block;
}

/* Logo Header Section */
.logo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    color: #800020;
    text-align: center;
    margin: 10px 0;
    line-height: 1.3;
}

.brand-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: #000080;
    text-align: center;
    margin-bottom: 20px;
}

body.dark .brand-title {
    color: #ff6b6b;
}

body.dark .brand-subtitle {
    color: #6b9aff;
}

/* Headings */
h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

body.dark h1 {
    color: #fff;
}

/* Info text */
.info {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

body.dark .info {
    color: #bbb;
}

.info.alert {
    color: #e74c3c;
    background: #fadbd8;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
}

body.dark .info.alert {
    background: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
}

.info.bt {
    margin-top: 20px;
    margin-bottom: 0;
    font-size: 12px;
    opacity: 0.7;
}

.info a {
    color: #800020;
    text-decoration: none;
    font-weight: 500;
}

.info a:hover {
    text-decoration: underline;
}

/* Form elements */
form {
    width: 100%;
}

label {
    display: block;
    position: relative;
    margin-bottom: 15px;
}

.ico {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.5;
    pointer-events: none;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 12px 12px 42px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f9f9f9;
    color: #333;
}

body.dark input[type="text"],
body.dark input[type="password"] {
    background: #3a3a3a;
    border-color: #4a4a4a;
    color: #fff;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #800020;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

body.dark input[type="text"]:focus,
body.dark input[type="password"]:focus {
    background: #424242;
    border-color: #800020;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #999;
}

input[type="submit"],
button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #800020 0%, #000080 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

input[type="submit"]:hover,
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(128, 0, 32, 0.5);
}

input[type="submit"]:active,
button:active {
    transform: translateY(0);
}

/* Table for logout pages */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table tr {
    border-bottom: 1px solid #e0e0e0;
}

body.dark table tr {
    border-bottom-color: #4a4a4a;
}

table tr:last-child {
    border-bottom: none;
}

table td {
    padding: 12px 8px;
    font-size: 14px;
}

table td:first-child {
    font-weight: 600;
    color: #666;
    width: 45%;
}

body.dark table td:first-child {
    color: #aaa;
}

table td:last-child {
    color: #333;
    text-align: right;
}

body.dark table td:last-child {
    color: #fff;
}

table a {
    color: #800020;
    text-decoration: none;
}

table a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .landing-brand-title {
        font-size: 28px;
    }

    .landing-tagline {
        font-size: 14px;
    }

    .welcome-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .welcome-text {
        font-size: 15px;
    }

    .connection-badge {
        font-size: 13px;
    }

    .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .resource-card {
        padding: 25px 15px;
        min-height: 120px;
    }

    .card-icon {
        font-size: 36px;
    }

    .card-title {
        font-size: 13px;
    }

    .compact-info-grid {
        grid-template-columns: 1fr;
    }

    .summary-info {
        font-size: 11px;
    }

    .section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .wrap {
        padding: 30px 25px;
    }

    h1 {
        font-size: 20px;
    }

    .info {
        font-size: 13px;
    }

    input[type="text"],
    input[type="password"] {
        font-size: 14px;
    }

    table td {
        font-size: 13px;
        padding: 10px 5px;
    }

    .landing-brand-title {
        font-size: 24px;
    }

    .landing-header {
        padding: 30px 15px;
    }

    .welcome-bar {
        padding: 12px 15px;
    }

    .compact-info-section {
        padding: 15px;
    }

    .info-summary {
        padding: 12px 15px;
        font-size: 14px;
    }

    .compact-info-grid {
        padding: 15px;
    }

    .compact-info-item {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

    .resources-section {
        padding: 35px 15px 30px;
    }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .resource-card {
        padding: 20px 10px;
        min-height: 110px;
    }

    .card-icon {
        font-size: 32px;
    }

    .btn-compact-logout {
        min-width: auto;
        width: 100%;
    }

    .logo-img {
        height: 50px;
    }

    .summary-info {
        display: none;
    }

    .info-summary {
        justify-content: flex-start;
    }
}

@media (max-width: 360px) {
    .wrap {
        padding: 25px 20px;
    }

    table td:first-child {
        width: 40%;
    }

    .card-title {
        font-size: 12px;
    }
}
