/* --- FONT IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&display=swap');

/* --- CSS VARIABLES --- */
:root {
    --primary-color: #ff4506;
    --primary-gradient: linear-gradient(45deg, #ff4506, #ff7140);
    --dark-color: #2c3e50;
    --text-color: #5a6a7a;
    --light-color: #ffffff;
    --bg-color: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-color: rgba(44, 62, 80, 0.1);
    --status-active: #28a745;
    --status-inactive: #6c757d;
    --status-expired: #ffc107;
    --status-revoked: #dc3545;
}

/* --- GENERAL STYLES --- */
body {
    font-family: 'Sora', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* --- HEADER --- */
.header {
    background: var(--primary-gradient);
    color: var(--light-color);
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 69, 6, 0.2);
}
.header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}
.header .user-info a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}
.header .user-info a:hover { opacity: 0.8; }

/* --- FORMS & SECTIONS --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 300px 1fr;
    }
}

.form-section {
    background: var(--light-color);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--shadow-color);
}
.form-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

input[type="text"], input[type="email"], select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 69, 6, 0.15);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-color);
}
.btn-primary:hover { background-color: #d93a05; transform: translateY(-2px); }

/* --- STATUS BADGES --- */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--light-color);
}
.status-active { background-color: var(--status-active); }
.status-inactive { background-color: var(--status-inactive); }
.status-expired { background-color: var(--status-expired); color: var(--dark-color); }
.status-revoked { background-color: var(--status-revoked); }

/* --- ACTION BUTTONS --- */
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}
.action-btn svg { width: 18px; height: 18px; }
.action-btn.revoke:hover { color: var(--status-expired); }
.action-btn.delete:hover { color: var(--status-revoked); }

/* --- NOTIFICATIONS --- */
.notification {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.notification.error { background-color: rgba(220, 53, 69, 0.1); color: #dc3545; }
.notification.success { background-color: rgba(40, 167, 69, 0.1); color: #28a745; }

/* --- RESPONSIVE TABLE STYLES --- */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    background: var(--light-color);
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--shadow-color);
    padding: 20px;
}

.licenses-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.licenses-table thead th {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #e0e0e0;
}

.licenses-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

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

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

.licenses-table td {
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 14px;
    color: var(--dark-color);
}

.licenses-table .actions-cell {
    display: flex;
    gap: 5px;
    justify-content: flex-start;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .licenses-table thead {
        display: none; /* Hide table headers on small screens */
    }

    .licenses-table, .licenses-table tbody, .licenses-table tr, .licenses-table td {
        display: block;
        width: 100%;
    }

    .licenses-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--light-color);
        box-shadow: 0 2px 10px var(--shadow-color);
        padding: 10px;
    }

    .licenses-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
    }

    .licenses-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--text-color);
    }

    .licenses-table .actions-cell {
        justify-content: flex-end;
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
        margin-top: 10px;
    }
}