/* Custom styles for Saola Animate License Activation Management */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

/* Main Container */
#wrap {
    max-width: 90%;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e4e8;
    overflow: hidden;
}

/* Header */
.header {
    background: #2c3e50;
    padding: 30px 40px;
    color: white;
    border-bottom: 3px solid #3498db;
    position: relative;
}

.header h1,
.header h2 {
    font-size: 26px;
    font-weight: 600;
    margin: 0;
    color: white;
}

/* Content Area */
.content {
    padding: 40px;
}

/* Instruction Box */
.instruction-box {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.instruction-box strong {
    color: #2c3e50;
    display: inline;
    font-size: inherit;
    font-weight: 600;
}

.instruction-box ol,
.instruction-box ul {
    margin-left: 20px;
    margin-top: 10px;
}

.instruction-box li {
    margin: 8px 0;
    color: #555;
}

/* Form Elements */
label, .form-label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
}

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

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: white;
}

input:invalid:not(:placeholder-shown),
.form-control:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

input:valid:not(:placeholder-shown),
.form-control:valid:not(:placeholder-shown) {
    border-color: #27ae60;
}

/* Buttons */
button,
input[type="submit"],
.btn,
.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover,
input[type="submit"]:hover,
.btn:hover,
.btn-primary:hover {
    background: #2980b9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
}

button:active,
input[type="submit"]:active,
.btn:active,
.btn-primary:active {
    background: #2574a9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Button Variants */
.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-primary:active {
    background: #2574a9;
}

.btn-activate,
.btn-success {
    background: #27ae60;
}

.btn-activate:hover,
.btn-success:hover {
    background: #229954;
}

.btn-activate:active,
.btn-success:active {
    background: #1e8449;
}

.btn-deactivate,
.btn-info {
    background: #e67e22;
}

.btn-deactivate:hover,
.btn-info:hover {
    background: #d35400;
}

.btn-deactivate:active,
.btn-info:active {
    background: #ba4a00;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 0 1 auto;
    min-width: 150px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
    padding: 12px;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

thead {
    background: #2c3e50;
    color: white;
}

thead th {
    font-weight: 600;
    text-align: left;
    padding: 12px;
}

tbody td {
    padding: 12px;
}

caption {
    caption-side: top;
    padding: 10px 0;
    font-weight: 600;
    color: #2c3e50;
    text-align: left;
}

/* Table Responsive */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 20px 40px;
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    border-top: 1px solid #e1e4e8;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Info Display */
.info-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e1e4e8;
}

.info-display div {
    margin: 8px 0;
    color: #2c3e50;
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    border-left-width: 4px;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #3498db;
    color: #0c5460;
}

.alert-success {
    background-color: #d4edda;
    border-color: #27ae60;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

/* Responsive Styles */

/* Tablet and smaller desktop screens (768px - 1024px) */
@media (max-width: 1024px) {
    #wrap {
        max-width: 95%;
        margin: 30px auto;
    }

    .header,
    .content,
    .footer {
        padding: 30px;
    }
}

/* Tablet screens (481px - 768px) */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    #wrap {
        max-width: 100%;
        margin: 15px auto;
        border-radius: 6px;
    }

    .header,
    .content,
    .footer {
        padding: 20px;
    }

    .header h1,
    .header h2 {
        font-size: 22px;
        line-height: 1.3;
    }

    button,
    input[type="submit"],
    .btn {
        padding: 12px 24px;
        margin-bottom: 10px;
        font-size: 14px;
    }

    /* Button groups stack on tablet */
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

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

    .instruction-box {
        padding: 15px;
        margin-bottom: 20px;
    }

    .instruction-box li {
        font-size: 14px;
    }

    /* Info display responsive */
    .info-display {
        padding: 15px;
        font-size: 14px;
    }

    .info-display div {
        margin: 10px 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Table responsive improvements */
    .table-responsive {
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 4px;
    }

    table,
    .table {
        font-size: 13px;
        margin-bottom: 0;
    }

    thead th,
    tbody td {
        padding: 10px 6px;
        font-size: 12px;
    }

    /* Make table scrollable on very small screens */
    caption {
        font-size: 14px;
        padding: 8px;
    }

    /* Form elements */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    .form-control {
        font-size: 14px;
        padding: 10px;
    }

    label, .form-label {
        font-size: 14px;
    }

    /* Alert messages */
    .alert {
        padding: 12px;
        font-size: 14px;
    }
}

/* Mobile screens (max 480px) */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    #wrap {
        margin: 10px auto;
        border-radius: 4px;
    }

    .header,
    .content,
    .footer {
        padding: 15px;
    }

    .header h1,
    .header h2 {
        font-size: 18px;
        line-height: 1.3;
    }

    button,
    input[type="submit"],
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .instruction-box {
        padding: 12px;
        margin-bottom: 15px;
    }

    .instruction-box li {
        font-size: 13px;
        margin: 6px 0;
    }

    .info-display {
        padding: 12px;
        font-size: 13px;
    }

    .info-display div {
        margin: 8px 0;
    }

    /* Table adjustments for very small screens */
    table,
    .table {
        font-size: 11px;
    }

    thead th,
    tbody td {
        padding: 6px 3px;
        font-size: 11px;
    }

    /* Hide less important columns on very small screens */
    thead th:nth-child(3),
    tbody td:nth-child(3),
    thead th:nth-child(4),
    tbody td:nth-child(4) {
        display: none;
    }

    caption {
        font-size: 13px;
        padding: 6px;
    }

    /* Form elements */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    .form-control {
        font-size: 13px;
        padding: 8px;
    }

    label, .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

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

    /* Alert messages */
    .alert {
        padding: 10px;
        font-size: 13px;
    }

    /* Footer */
    .footer {
        font-size: 11px;
        padding: 15px;
    }
}

/* Very small mobile screens (max 360px) */
@media (max-width: 360px) {
    .header h1,
    .header h2 {
        font-size: 16px;
    }

    button,
    input[type="submit"],
    .btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .instruction-box,
    .info-display,
    .alert {
        font-size: 12px;
    }

    /* Further simplify table for tiny screens */
    thead th:nth-child(5),
    tbody td:nth-child(5) {
        display: none;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 5px;
    }

    #wrap {
        margin: 10px auto;
    }

    .header {
        padding: 15px 20px;
    }

    .header h1,
    .header h2 {
        font-size: 18px;
    }

    .content {
        padding: 20px;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    #wrap {
        box-shadow: none;
        border: none;
        max-width: 100%;
    }

    .header {
        background: white;
        color: black;
        border-bottom: 2px solid #333;
    }

    .header h1,
    .header h2 {
        color: black;
    }

    button,
    .btn {
        display: none;
    }

    .table-responsive {
        overflow: visible;
    }

    thead {
        background: #f0f0f0;
        color: black;
    }
}

