/* Professional License Management System Styles */

/* CSS Variables for consistent theming */
:root {
    --primary-gray: #2c3e50;
    --secondary-gray: #34495e;
    --light-gray: #ecf0f1;
    --medium-gray: #bdc3c7;
    --dark-gray: #7f8c8d;
    --accent-gray: #95a5a6;
    --white: #ffffff;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--primary-gray);
    line-height: 1.6;
}

/* Top Navigation Bar */
.top-navbar {
    background: linear-gradient(135deg, var(--primary-gray), var(--secondary-gray));
    color: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--white);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.user-email {
    font-weight: 500;
    font-size: 0.9rem;
}

.logout-btn {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
}

.card-header {
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-gray);
    margin: 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-gray);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-gray);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-gray);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary-gray);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-gray);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
    overflow-y: visible;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table th {
    background: var(--primary-gray);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
    vertical-align: middle;
}

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

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: var(--success);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: var(--warning);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left-color: var(--danger);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--info);
}

/* Login page specific */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-gray), var(--medium-gray));
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-gray);
    font-size: 2rem;
    font-weight: 300;
}

/* Limited access page */
.limited-container {
    text-align: center;
    padding: 3rem;
}

.limited-icon {
    font-size: 4rem;
    color: var(--accent-gray);
    margin-bottom: 1rem;
}

.limited-title {
    font-size: 2rem;
    color: var(--primary-gray);
    margin-bottom: 1rem;
}

.limited-message {
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .top-navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-user {
        width: 100%;
        justify-content: space-between;
    }
    
    .table-container {
        font-size: 0.9rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    position: relative;
    background: var(--primary-gray);
    color: var(--white);
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.dropdown-toggle:hover {
    background: var(--secondary-gray);
}

.dropdown-menu {
    display: none;
    position: fixed;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    border-radius: var(--border-radius);
    border: 1px solid var(--medium-gray);
    right: auto;
    top: auto;
    margin-top: 0.25rem;
}

.dropdown-menu a {
    color: var(--primary-gray);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    transition: var(--transition);
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background-color: var(--light-gray);
}

.dropdown-menu a:first-child {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.dropdown-menu a:last-child {
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--medium-gray);
    margin: 0.5rem 0;
}

.delete-action {
    color: var(--danger) !important;
    font-weight: 500;
}

.delete-action:hover {
    background-color: #fdf2f2 !important;
    color: #c0392b !important;
}

/* Copy button */
.copy-btn {
    background: var(--info);
    color: var(--white);
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    transition: var(--transition);
}

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

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }