/* MailMasker Drive Web UI - Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

.screen {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* ============ Login Screen ============ */

#login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
}

.login-container h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #333;
    font-size: 28px;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#login-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

#login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#login-form button {
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

#login-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#login-form button:active {
    transform: translateY(0);
}

#login-error {
    color: #dc3545;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
}

/* ============ Drive Screen ============ */

#drive-screen {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 24px;
    margin: 0;
}

#user-info {
    flex: 1;
    text-align: center;
    font-size: 14px;
    opacity: 0.9;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============ Quota Bar ============ */

.quota-bar {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.quota-info {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.progress-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

#quota-progress {
    height: 100%;
    background: #28a745;
    transition: width 0.3s, background 0.3s;
    border-radius: 4px;
}

/* ============ Toolbar ============ */

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    gap: 20px;
}

.current-path {
    font-weight: 500;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.action-btn:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
}

/* ============ File List ============ */

.file-list {
    padding: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    color: #333;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background: #f8f9fa;
}

a {
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.parent-link,
.folder-link {
    font-weight: 500;
}

/* ============ Responsive ============ */

@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .current-path {
        order: 2;
        margin-top: 10px;
    }

    .actions {
        order: 1;
        justify-content: stretch;
    }

    .action-btn {
        flex: 1;
    }

    header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    #user-info {
        order: 2;
        flex: none;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 8px;
    }

    .action-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 10px;
    }

    .file-list {
        padding: 10px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 6px;
    }

    header h1 {
        font-size: 18px;
    }

    .login-container {
        padding: 20px;
    }

    .login-container h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }
}
